import { axios } from '@/utils/request'
// 服务类目
export function cateList(params) {
  return axios({
    url: '/worker/worker-cate/worker-cate-list',
    method: 'get',
    params,
  })
}

export function cateSave(data) {
  return axios({
    url: '/worker/worker-cate/worker-cate-save',
    method: 'post',
    data,
  })
}

export function cateStatus(data) {
  return axios({
    url: '/worker/worker-cate/worker-cate-status',
    method: 'post',
    data,
  })
}

// 服务人员
export function workerList(params) {
  return axios({
    url: '/worker/worker/worker-list',
    method: 'get',
    params,
  })
}

export function workerSave(data) {
  return axios({
    url: '/worker/worker/worker-save',
    method: 'post',
    data,
  })
}

export function workerStatus(data) {
  return axios({
    url: '/worker/worker/worker-status',
    method: 'post',
    data,
  })
}

// 服务人员等级
export function workerLevelList(params) {
  return axios({
    url: '/worker/worker-level/worker-level-list',
    method: 'get',
    params,
  })
}

export function workerLevelSave(data) {
  return axios({
    url: '/worker/worker-level/worker-level-save',
    method: 'post',
    data,
  })
}

export function workerLevelStatus(data) {
  return axios({
    url: '/worker/worker-level/worker-level-status',
    method: 'post',
    data,
  })
}

// 服务商品分类
export function goodsCateList(params) {
  return axios({
    url: '/worker/worker-goods-cate/worker-goods-cate-list',
    method: 'get',
    params,
  })
}

export function goodsCateSave(data) {
  return axios({
    url: '/worker/worker-goods-cate/worker-goods-cate-save',
    method: 'post',
    data,
  })
}

export function goodsCateStatus(data) {
  return axios({
    url: '/worker/worker-goods-cate/worker-goods-cate-status',
    method: 'post',
    data,
  })
}

// 商品分类
export function goodsCatList(params) {
  return axios({
    url: '/goods/worker-goods-cat-list',
    method: 'get',
    params,
  })
}

export function selectWorkerList(params) {
  return axios({
    url: '/goods/worker-list',
    method: 'get',
    params,
  })
}
export function commentList(params) {
  return axios({
    url: '/worker/worker/comment-list',
    method: 'post',
    params,
  })
}
export function setting(params,type = 'get') {
  return axios({
    url: '/worker/worker/setting',
    method: type,
    params: type == 'get'? params: '',
    data: type != 'get' ? params: '' 
  })
}
export function bindWorker(params) {
  return axios({
    url: '/worker/worker/bind-worker',
    method: "post",
    data: params
  })
}
export function orderIsPay(params) {
  return axios({
    url: '/worker/worker/order-is-pay',
    method: "post",
    data: params
  })
}
export function orderConfirm(params) {
  return axios({
    url: '/worker/worker/order-confirm',
    method: "post",
    data: params
  })
}
